import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [

  {
    title: '物料名称',
    align: "center", resizable: true,
    dataIndex: 'materialName'
  },
  {
    title: '物料类型',
    align: "center", resizable: true,
    dataIndex: 'materialType_dictText'
  },
  {
    title: '单位',
    align: "center", resizable: true,
    dataIndex: 'unit_dictText'
  },
  {
    title: '物料图片',
    align: "center", resizable: true,
    dataIndex: 'fileRecordId',
    customRender: render.renderImage,
  },
  {
    title: '相关资料',
    align: "center", resizable: true,
    dataIndex: 'attachmentUrl',
  },
];

// 高级查询数据
export const superQuerySchema = {
  number: {title: '编号',order: 0,view: 'text', type: 'string',},
  materialName: {title: '物料名称',order: 1,view: 'text', type: 'string',},
  materialType: {title: '物料类型',order: 2,view: 'list', type: 'string',dictCode: 'material_type',},
  unit: {title: '单位',order: 3,view: 'list', type: 'string',dictCode: 'unit',},
  fileRecordId: {title: '物料图片',order: 4,view: 'image', type: 'string',},
  attachmentUrl: {title: '相关资料',order: 5,view: 'file', type: 'string',},
};
